﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BySoft.Server.Common;
using BySoft.Server.Common.Entity;
using BySoft.Web.Utility;
using BySoft.Server.Business;

namespace BySoft.Web.Site.SysManage
{
    public partial class ExceptionLogView :  AuthBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            string strLogID = Request.QueryString["LogID"];
            if (!string.IsNullOrEmpty(strLogID))
            {
                try
                {
                    int nLogID = CommonMethod.ConvertToInt(strLogID);
                    SysExceptonlogEntity enLog = SysExceptonlog.GetSysExceptonlogByID(nLogID);
                    lblErrorMessage.Text = enLog.ExceptionMessage;
                    lblExceptionType.Text = enLog.ExceptionType;
                    lblIP.Text = enLog.IPAddress;
                    lblModule.Text = enLog.ModuleName;
                    lblStackTrace.Text = enLog.OrgStackTrace;
                    lblTime.Text = ((DateTime)enLog.RecordTime).ToString(SystemConfig.DBDateTimeFromat);
                    lblUrl.Text = enLog.ExceptionUrl;
                }
                catch
                {

                }
            }
        }
    }
}
